﻿ <Window x:Class="Sample.RenderPerformance.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:zoil="http://zoil.codeplex.com/schemas/2012"
        xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" Title="MainWindow" Height="350" Width="525" WindowState="Maximized" WindowStyle="ThreeDBorderWindow">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="80"></RowDefinition>
            <RowDefinition Height="1*"></RowDefinition>
        </Grid.RowDefinitions>
        <zoil:ZInformationLandscape Grid.Row="1" x:Name="InformationLandscape" ConstraintsEnabled="True" CacheModeInterval="1000">
            <i:Interaction.Behaviors>
                <zoil:MouseInputBehavior />
                <zoil:TouchInputBehavior />
            </i:Interaction.Behaviors>
            <WrapPanel x:Name="LandscapeCanvas" Width="1920" Background="DeepSkyBlue" zoil:ZInformationLandscape.ZoomTarget="True" />
        </zoil:ZInformationLandscape>
        <Border x:Name="ProgressIndicator" Grid.Row="1" Background="Gray" Opacity="0.5" Visibility="Collapsed">
            <TextBlock Text="Please wait while updating landscape..." VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="40" FontFamily="SegoeUI" FontWeight="Light" />
        </Border>
        <StackPanel Grid.Row="0" Background="LightGray">
            <StackPanel Orientation="Horizontal" HorizontalAlignment="Stretch">
                <TextBlock VerticalAlignment="Center">IsConstantUpdateEnabled: </TextBlock>
                <ToggleButton VerticalAlignment="Center" IsChecked="{Binding ElementName=InformationLandscape, Path=IsConstantUpdateEnabled, Mode=TwoWay}" Content="{Binding ElementName=InformationLandscape, Path=IsConstantUpdateEnabled}"/>
            </StackPanel>
            <StackPanel Orientation="Horizontal" HorizontalAlignment="Stretch">
                <TextBlock VerticalAlignment="Center">CacheMode Enabled:</TextBlock>
                <ToggleButton VerticalAlignment="Center" IsChecked="{Binding ElementName=InformationLandscape, Path=CacheModeEnabled, Mode=TwoWay}" Content="{Binding ElementName=InformationLandscape, Path=CacheModeEnabled}"/>
            </StackPanel>
            <StackPanel Orientation="Horizontal" HorizontalAlignment="Stretch">
                <TextBlock VerticalAlignment="Center">Elements: </TextBlock>
                <Slider x:Name="ElementsSlider" Width="300" Value="250" Minimum="0" Maximum="1000" IsSnapToTickEnabled="True" TickFrequency="50" TickPlacement="BottomRight" ValueChanged="SliderValueChanged" />
                <TextBlock Text="{Binding Path=Value, ElementName=ElementsSlider}" />
            </StackPanel>
            <StackPanel Orientation="Horizontal" HorizontalAlignment="Stretch">
                <TextBlock VerticalAlignment="Center">Elements not in cache mode:</TextBlock>
                <TextBlock VerticalAlignment="Center" Text="{Binding ElementName=InformationLandscape, Path=ElementsNotInCacheMode, Mode=OneWay}" />
            </StackPanel>
        </StackPanel>
    </Grid>
</Window>
